using SheLife.Domain.Entities;

namespace SheLife.Application.Interfaces;

public interface IMenstrualCycleService
{
    Task<MenstrualCycle?> GetMenstrualCycleByIdAsync(Guid id);
    Task<IEnumerable<MenstrualCycle>> GetMenstrualCyclesByUserIdAsync(Guid userId);
    Task<IEnumerable<MenstrualCycle>> GetMenstrualCyclesByUserIdAndDateRangeAsync(Guid userId, DateTime startDate, DateTime endDate);
    Task<MenstrualCycle> CreateMenstrualCycleAsync(Guid userId, DateTime startDate, DateTime endDate, int cycleLength, int periodLength, string? notes = null);
    Task<MenstrualCycle?> UpdateMenstrualCycleAsync(Guid id, DateTime? startDate, DateTime? endDate, int? cycleLength, int? periodLength, string? notes = null);
    Task<bool> DeleteMenstrualCycleAsync(Guid id);
    Task<MenstrualCycle?> GetCurrentMenstrualCycleAsync(Guid userId);
    Task<DateTime?> PredictNextPeriodAsync(Guid userId);
    Task<DateTime?> PredictNextOvulationAsync(Guid userId);
    Task<Dictionary<string, int>> GetMenstrualCycleStatisticsAsync(Guid userId, int months = 12);
}

public interface IMenstrualSymptomService
{
    Task<MenstrualSymptom?> GetMenstrualSymptomByIdAsync(Guid id);
    Task<IEnumerable<MenstrualSymptom>> GetMenstrualSymptomsByUserIdAsync(Guid userId);
    Task<IEnumerable<MenstrualSymptom>> GetMenstrualSymptomsByUserIdAndDateRangeAsync(Guid userId, DateTime startDate, DateTime endDate);
    Task<IEnumerable<MenstrualSymptom>> GetMenstrualSymptomsByUserIdAndTypeAsync(Guid userId, string symptomType);
    Task<MenstrualSymptom> CreateMenstrualSymptomAsync(Guid userId, DateTime date, string symptomType, int severity, string? description = null);
    Task<MenstrualSymptom?> UpdateMenstrualSymptomAsync(Guid id, DateTime? date, string? symptomType, int? severity, string? description = null);
    Task<bool> DeleteMenstrualSymptomAsync(Guid id);
    Task<Dictionary<string, int>> GetSymptomStatisticsAsync(Guid userId, int months = 3);
}

public interface IMenstrualNoteService
{
    Task<MenstrualNote?> GetMenstrualNoteByIdAsync(Guid id);
    Task<IEnumerable<MenstrualNote>> GetMenstrualNotesByUserIdAsync(Guid userId);
    Task<IEnumerable<MenstrualNote>> GetMenstrualNotesByUserIdAndDateRangeAsync(Guid userId, DateTime startDate, DateTime endDate);
    Task<MenstrualNote> CreateMenstrualNoteAsync(Guid userId, DateTime date, string title, string content, string? mood = null);
    Task<MenstrualNote?> UpdateMenstrualNoteAsync(Guid id, DateTime? date, string? title, string? content, string? mood = null);
    Task<bool> DeleteMenstrualNoteAsync(Guid id);
}

public interface IBasalBodyTemperatureService
{
    Task<BasalBodyTemperature?> GetBasalBodyTemperatureByIdAsync(Guid id);
    Task<IEnumerable<BasalBodyTemperature>> GetBasalBodyTemperaturesByUserIdAsync(Guid userId);
    Task<IEnumerable<BasalBodyTemperature>> GetBasalBodyTemperaturesByUserIdAndDateRangeAsync(Guid userId, DateTime startDate, DateTime endDate);
    Task<BasalBodyTemperature> CreateBasalBodyTemperatureAsync(Guid userId, DateTime date, decimal temperature, string? notes = null);
    Task<BasalBodyTemperature?> UpdateBasalBodyTemperatureAsync(Guid id, DateTime? date, decimal? temperature, string? notes = null);
    Task<bool> DeleteBasalBodyTemperatureAsync(Guid id);
    Task<DateTime?> PredictOvulationByTemperatureAsync(Guid userId);
    Task<IEnumerable<BasalBodyTemperature>> GetTemperatureChartAsync(Guid userId, int days = 30);
}